<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/public/header.jsp"%>

<html>
	<head>
		<style>
			.td1{
				padding-top:10px;
				padding-bottom:5px;
				font-size: 12px;
				background-color: #c0ebd7;
				width:20%;
			}
			.td2{
				padding:5px;
				width:30%;
			}
		</style>
	</head>
	<script type="text/javascript">
		function fileUpload(){
			var uploadFile = $('#uploadFile').val();
			if(uploadFile == null || uploadFile == ""){
				$.messager.alert('提示',"请选择上传文件");
				return;
			}
			$('form').submit();
		}
	</script>
	<body>
		<div style="width: 90%;padding-left:50px">
			<form  method="POST" action="<%=contextPath %>/springMVC/excel/historyUpload" enctype="multipart/form-data">
			<table  style="border-collapse: collapse;" width="100%" border="1px" bordercolor="#0eb83a">
				<tr>
					<td align="right" class="td1" nowrap>Excel格式模板：</td>
					<td class="td2" nowrap colspan="3">
						<a href="<%=contextPath %>/springViews/模板.xlsx" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:false">格式模板下载</a>
					</td>
				</tr>
				<tr>
					<td align="right" class="td1" nowrap>选择Excel文件：</td>
					<td class="td2" nowrap colspan="3">
						<input type="file" id="uploadFile" name="uploadFile"/>
					</td>
				</tr>
				<tr>
					<td align="right" class="td1" nowrap></td>
					<td colspan="3" style="padding-left:10px;padding-top:5px;padding-bottom:5px;" nowrap>
						<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:false" onclick="fileUpload();">导入</a>
					</td>
				</tr>
			</table>
			</form>
		</div>
	</body>
</html>
